package view;

import java.awt.Cursor;

import javax.swing.JMenuItem;

import org.apache.log4j.Logger;

public class FwkMenuItem extends JMenuItem {
	private static Logger logger = Logger.getLogger(FwkMenuItem.class);
	/**
	 * 
	 */
	private static final long serialVersionUID = 6950884769813030848L;

	public FwkMenuItem(int key, String pathImage, String tooltip, String message) {

		this.setMnemonic(key);
		this.setText(message);
		this.setIcon(FwkViewsUtils.getIcon(pathImage, 15, 15));
		setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
		if (tooltip == null || tooltip.trim().equals("")) {
			this.setToolTipText(message);
		} else {
			this.setToolTipText(tooltip);
		}
	}
}
